Adjusting the appearance of 2D nodes
You can adjust the appearance of 2D nodes by filling their background with a brush. For example, you can set the background color of a Page node, fill a Text Block 2D node with a texture, or apply a material to a Button 2D node.
You can fill 2D nodes with:
Filling 2D nodes with a solid color
Use a Color Brush to fill a 2D node with a solid color.
To fill a 2D node with a solid color:
- In the Project select or create the 2D node the appearance of which you want to adjust.
For example, in the Project press Alt and right-click the Viewport 2D node and create a Text Block 2D node.
- In the Properties add the Background Brush property.
You adjust the look and behavior of nodes in your project with properties. See Property system.
- In the Properties open the Background Brush property dropdown menu and select + Color Brush.
- In the Properties next to the Background Brush property click and set the color of the color brush you created in the previous step.
In the Properties click next to a property to access and edit the resource to which the property points without moving away from the currently selected node.
In the Preview you can see that the Color Brush you created fills the background of the node for which you set the Background Brush property.
Filling 2D nodes with a texture
Use a Texture Brush to fill a 2D node with a texture.
To fill a 2D node with a texture:
- In the Library press Alt and right-click Materials and Textures and select Texture Brush.
- In the Project select the 2D node the appearance of which you want to adjust, in the Properties add the Background Brush property, and select the brush you created in the first step.
For example, create a Text Block 2D node, in the Properties add the Background Brush property and set it to the brush you created in the first step.
- In the Properties click next to the Background Brush property to go to the brush used by that property, set the texture you want this texture brush to use, and adjust how the Texture Brush uses that texture:
- Brush Modulate Color sets the modulation color for the brush.
- Brush Horizontal Tiling affects the scale of the texture coordinates to set the horizontal tiling of the texture.
- Brush Vertical Tiling affects the scale of the texture coordinates to set the vertical tiling of the texture.
- Brush Texture sets the texture for the brush.
Filling 2D nodes with a material
Use a Material Brush to fill a 2D node with a material.
To fill a 2D node with a material:
- In the Library press Alt and right-click Materials and Textures and select Material Brush.
- In the Properties set the Material property to the material you want to use to fill the background of a 2D node.
If you do not have any materials in your project, create a material. See Creating a material.
- In the Project select the 2D node the appearance of which you want to adjust, in the Properties add the Background Brush property, and select the brush you created in the first step.
For example, create a Button 2D node, in the Properties add the Background Brush property, and set it to the brush you created in the first step.
See also
Using brushes
Using materials
Textures
Applying custom rendering to 2D nodes
Creating a 3D perspective effect for 2D nodes
Open topic with navigation